<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 伪元素选择器权重0001 */
        /* ::before 在父元素里的前面添加一个行内元素 */
        /* ::after 在父元素里的后面添加一个行内元素 */
        /* 伪元素是行内元素 */
        @font-face {
            font-family: 'icomoon';
            src: url('fonts/icomoon.eot?a5o0g9');
            src: url('fonts/icomoon.eot?a5o0g9#iefix') format('embedded-opentype'),
                url('fonts/icomoon.ttf?a5o0g9') format('truetype'),
                url('fonts/icomoon.woff?a5o0g9') format('woff'),
                url('fonts/icomoon.svg?a5o0g9#icomoon') format('svg');
            font-weight: normal;
            font-style: normal;
            font-display: block;
        }
        div {
            position: relative;
            width: 250px;
            height: 25px;
            border: 2px solid #ccc;
        }
        div::after {
            position: absolute;
            right: 8px;
            top: 3.5px;
            content: '';
            font: 18px 'icomoon';
            color: grey;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>